package JUnitTests;

import static org.junit.Assert.*;

import org.junit.Test;

import BuncoPlus.BuncoPlusStrategy;
import Framework.Game;
import Framework.Player;

public class TestGame
{

    @Test
    public void testAddPlayer()
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.AddPlayer("test");
        
        if (g.getPlayers() == null)
        fail("Addplayer non fonctionnel");
    }
    
    public void testGetPlayer()
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.AddPlayer("test");
        
        if (g.getPlayers() == null)
        fail("Getplayer non fonctionnel");
    }
    
    public void TestgetNumberOfPlayers() 
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.AddPlayer("test");
        g.AddPlayer("test2");
        
        if (g.getNumberOfPlayers() != 2)
            fail("GetNumberOfPlayer non fonctionnel");
    }
    
    public void TestsetNumberOfPlayers(int numberOfPlayers) 
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.setNumberOfPlayers(4);
        
        if (g.getNumberOfPlayers() != 4)
            fail("SetNumberOfPlayer non fonctionnel");
    }
    
    public void TestgetWinner() 
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.setWinner(new Player("test"));
        
        if (g.getWinner() == null)
            fail("getWinner non fonctionnel");
    }
    
    public void TestStetWinner() 
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.setWinner(new Player("test"));
        
        if (g.getWinner() == null)
            fail("SetWinner non fonctionnel");
    }
    
    public void TestGetNumberMaxOfPlayers()
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.setNumberMaxOfPlayers(10);
        
        if (g.getNumberMaxOfPlayers() != 10)
            fail("getNumberMaxOfPlayers non fonctionnel");
    }
    
    public void TestSetNumberMaxOfPlayers()
    {
        Game g = new Game(new BuncoPlusStrategy());
        g.setNumberMaxOfPlayers(10);
        
        if (g.getNumberMaxOfPlayers() != 10)
            fail("getNumberMaxOfPlayers non fonctionnel");
    }
   
    

}
